#! /usr/bin/make

CXXFLAGS = -g -MMD -Wall -O1
ETAGS = /usr/bin/etags
VERSION = "???"
prefix = $(DESTDIR)/usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
includedir = $(prefix)/include
libdir = $(exec_prefix)/lib
localstatedir = $(prefix)/var

OBJ = basiciff.o iff_reader.o iff_writer.o
LIB = libbaiff.a

.PHONY: all
all:	$(LIB)

$(LIB):	$(OBJ)
	ar rcs $@ $^

install:
	install -d $(libdir)
	install -d $(includedir)
	cp $(LIB) $(libdir)
	cp basiciff.h basiciff.hh $(includedir)

uninstall:
	rm $(includedir)/basiciff.h*
	rm $(libdir)/$(LIB)

.PHONY: clean
clean:
	rm -f *.o *.d $(LIB)

.PHONY: distclean
distclean:	clean

.PHONY: tags
tags:
	$(ETAGS) *.cc *.hh

#-include $(OBJ:.o=.d)
